var listTemplate = require('./index.string');
require('../../util/util.js');
var _account_service = require('service/account-service.js');
var _header = require('page/common/header/index.js');
const _util = require('../../util/util');


var orderList = {
    listData : {
        orderLists     : {},
    },
    init :function(){
        this.bindEvents();
        this.loadAccountInfo();
        return this;
    },
    bindEvents : function(){
    },
    loadAccountInfo : function(){
        var _this=this;
        _account_service.orders(
            function(res){
                _this.listData.orderLists=res;
                var result = _util.renderHtml(listTemplate, {ListData : _this.listData});
                $('#Catalog').html(result);
                console.log(result);
            },
            function(){

            }
        );
     }
};

module.exports = orderList.init();